Improve pipe handling of CMUX modem trace module#194
Merged
Conversation
5748383 to
9638930
Compare
Contributor
MarkusLassila
left a comment
There was a problem hiding this comment.
Looks promising. Checking the pipe idle before writing all but ensures that the traces will not affect the throughput of data.
However, we are also interested on getting reasonable traces out. I'll run some measurements with the changes.
| * The nrf_modem_lib_trace.c:trace_fragment_write() handles | ||
| * retrying if the backend returns -EAGAIN. | ||
| * | ||
| * It is important to call trace_processed_callback(len) for |
Contributor
There was a problem hiding this comment.
When CMUX is congested, the trace fifos will easily overflow, and I don't think that there is anything wrong with that. They are dropping traces, same as we are doing here.
I do agree on calling the trace_processed_callback() for every fragment, but that does not ensure the trace fifos not overflowing.
Cherry-pick a usefull helper function from my modem_pipe branch. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
f3f38fd to
5bc50c0
Compare
Improve handling of pipe open-close events of CMUX tracing module. Allow TX timeout to be defined by Kconfig. Remove unnecessary loop from trace backend as nRF library already loops on -EAGAIN. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no> Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
5bc50c0 to
afc2fc2
Compare
Contributor
|
Removed Kconfigs, they did not have any effect on trace quality. |
MarkusLassila
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve handling of pipe open-close events of CMUX tracing module.
Allow TX timeout and drop policy to be defined by Kconfig.
Remove unnecessary loop from trace backend as nRF library already
loops on -EAGAIN.
Attach the pipe from CMUX module, this is cleaner as trace module is enough to just follow pipe events. Does not need to poll CMUX if its started or not.